package com.yx.sys.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yx.common.vo.Result;
import com.yx.sys.entity.Post;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 提问或推荐 Mapper 接口
 * </p>
 *
 * @author yx
 * @since 2023-02-14
 */
public interface PostMapper extends BaseMapper<Post> {
    public List<Post> selectPostBytId(Integer tId);

    public List<?> selectFuzzyTitle(String titleName);

    public List<Post> selectPostByuId(Integer uId);

    public List<Post> selectPostBypId(Integer pId);

    public List<Post> selectNewPosts(Integer num);

    public List<Post> selectHotPostsBytId(Integer tId,Integer num);

    public List<Post> selectHotPosts(Integer num);

//    public List<Post> selectPostMesByuId(Integer status,Integer uId,Integer startId,Integer pageSize,Integer tag);
    public List<Post> selectPostMesByuId(Integer status,Integer uId,Integer tag);

    public Integer selectPostIsExist(String titleName, String pImg, String pDescribe, Integer tId, Integer uId);

}
